package be.bonamis.umpire.business.umpire.impl;

import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import be.bonamis.umpire.business.UmpireService;
import be.bonamis.umpire.business.impl.UmpireServiceImpl;
import be.bonamis.umpire.business.umpire.UmpireHandler;
import be.bonamis.umpire.ui.server.utils.UtilsContextAware;

public class ContextLoader {

	public static void main(String[] args) {
		ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("be.bonamis.umpire.ui.context.xml");
		UmpireHandler handler = context.getBean(UmpireHandlerImpl.class);
		System.out.println(handler.toString());
		
		UmpireService service = UtilsContextAware.getBeanByType(UmpireServiceImpl.class);
		System.out.println(service.toString());

	}

}
